package com.yc.cloud.openai.service;

import com.yc.cloud.openai.dto.NlpChunkResultDto;
import com.yc.cloud.openai.dto.OpenAiResultDto;
import com.yc.cloud.openai.dto.TTSResultDTO;
import com.yc.cloud.openai.request.OpenAiParam;
import org.springframework.http.codec.ServerSentEvent;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import reactor.core.publisher.Flux;

import java.util.Map;

public interface OpenAiService {
    String getIdentifier();

    /**
     * 通过文件路径进行ai大模型分析
     *
     * @param openAiParam 调用大模型的各种参数
     * @return 分析结果
     */
    OpenAiResultDto analysis(OpenAiParam openAiParam);

    /**
     * @param param
     * @return
     */
    TTSResultDTO getTTSResult(OpenAiParam param);

    Flux<String> analysisByStream(OpenAiParam openAiParam);

    Flux<ServerSentEvent<String>> analysisByStream2(OpenAiParam param);

    SseEmitter analysisByStream3(OpenAiParam param);
}
